<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>3-2-3</title>
    <!--   引入jQuery -->
    <script src="../scripts/jquery-1.3.1.js"></script>
 <script type="text/javascript">
 	
$(function(){
	$('div.first').replaceWith('<div>菠萝</div>');
 						//将苹果替换成菠萝
     	$('div.third').replaceWith('<div>苹果</div>');  
           
            //将苹果替换成菠萝
               
})
     
 </script>
	</head>
	<body>
		<h3>例子</h3>
		<div class="container">
		    <div class="first">苹果</div>
		    <div class="second">橘子</div>
		    <div class="third">菠萝</div>
		</div>
	</body>
</html>
